ccflags-y += -I$(src) -Wno-int-conversion
obj-m := binder_linux.o
binder_linux-y := deps.o binder.o

KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build

all:
	$(MAKE) -C $(KERNEL_SRC) V=0 M=$$PWD

modules:
	$(MAKE) -C $(KERNEL_SRC) V=0 M=$$PWD

install:
	$(shell sudo cp binder_linux.ko $(DESTDIR)/)

insmod:
	$(shell sudo insmod binder_linux.ko)
	$(shell sudo chmod +666 /dev/binder)

rmmod:
	$(shell sudo rmmod binder_linux)
	
clean:
	make -C $(KERNEL_SRC) M=$(PWD) clean
